package o;

import android.os.RemoteException;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import o.fhe.b;

public class fhj implements fhb {
    public /* synthetic */ Object ˋ(ffb o_ffb, fgn o_fgn, fia o_fia) {
        return ˏ(o_ffb, o_fgn, o_fia);
    }

    public fkd ˏ(final ffb o_ffb, fgn<b> o_fgn_o_fhe_b, final fia o_fia) {
        final fkh o_fkh = new fkh(null);
        o_fgn_o_fhe_b.ˎ(new fgl<fgp<b>>(this) {
            final /* synthetic */ fhj ˎ;

            public /* synthetic */ void ˊ(Object obj) {
                ˋ((fgp) obj);
            }

            public void ˋ(fgp<b> o_fgp_o_fhe_b) {
                b bVar = (b) o_fgp_o_fhe_b.ˏ();
                if (bVar.statusCode == 2) {
                    o_fkh.ˊ((fkg) fga.ˏ(o_ffb, o_fkh, (Long) bVar.ret.cast(Long.class)));
                } else if (bVar.statusCode == 1) {
                    o_fkh.ˋ((RemoteException) bVar.ret.cast(RemoteException.class));
                } else if (bVar.statusCode == 3) {
                    o_fkh.ˏ();
                } else {
                    ParameterizedType parameterizedType = (ParameterizedType) o_fia.ॱ();
                    if (parameterizedType != null) {
                        Type type = parameterizedType.getActualTypeArguments()[0];
                        if (type != null) {
                            o_fkh.ˋ(bVar.ret.cast(type));
                            return;
                        }
                    }
                    o_fkh.ˋ(new IllegalArgumentException("TaskStream type error"));
                }
            }
        });
        return o_fkh.ˊ();
    }

    public fey<fgb> ॱ(Object obj, fgv o_fgv) {
        fkd o_fkd = (fkd) obj;
        fey<fgb> o_fey = new fey(new fgb(null));
        o_fkd.ˏ(new 3(this, o_fey, o_fgv));
        return o_fey;
    }
}
